//
//  SccondiewController.m
//  06-Navigation作业
//
//  Created by dllo on 16/7/21.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "SccondiewController.h"
#import "ThirdViewController.h"
@interface SccondiewController ()

@end

@implementation SccondiewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.view.backgroundColor = [UIColor blueColor];
    UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
    button.frame = CGRectMake(100, 300, 250, 30);
    button.backgroundColor = [UIColor redColor];
    [self.view addSubview:button];
    [button addTarget:self action:@selector(buttonClicked) forControlEvents:UIControlEventTouchUpInside];
    [button setTitle:@"登录完成的页面" forState:UIControlStateNormal];
    
    UIButton *button1 = [UIButton buttonWithType:UIButtonTypeCustom];
    button1.frame = CGRectMake(50, 400, 200, 40);
    button1.backgroundColor = [UIColor redColor];
    [button1 setTitle:@"验证码" forState:UIControlStateNormal];
    [self.view addSubview:button1];

}

- (void)buttonClicked
{
    ThirdViewController *thirdViewController = [[ThirdViewController alloc] init];
    thirdViewController.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
    [self presentViewController:thirdViewController animated:YES completion:nil];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
